package Frame.battleanimation;

import FCRendering.FCRMaster;
import VWorldGameStudio.FCMonster;

import java.awt.*;

import static FCRendering.FCRMaster.fcv;

//上下跳动
public class UpDownJumpAni extends ABattleAni{
    FCMonster monster;

    int[] origs = new int[2];
    Integer[] s;


    public UpDownJumpAni(FCMonster monster){
        this.monster = monster;
        allFrames = 45;
        s = fcv.getBattleMonsterCoor().get(fcv.getBattleMonster().indexOf(monster));
        origs[0] = s[0];
        origs[1] = s[1];
    }

    @Override
    public void nextFrame(int frame) {
        if(frame < 5){
            s[1] = (int)(origs[1]-18*fcv.getProportion());
        }else if(frame < 10){
            s[1] = origs[1];
        }else if(frame < 15){
            s[1] = (int)(origs[1]+18*fcv.getProportion());
        }else if(frame < 20){
            s[1] = origs[1];
        }else if(frame < 25){
            s[1] = (int)(origs[1]-18*fcv.getProportion());
        }else if(frame < 30){
            s[1] = origs[1];
        }else if(frame < 35){
            s[1] = (int)(origs[1]+18*fcv.getProportion());
        }else if(frame < 40){
            s[1] = origs[1];
        }
    }

    @Override
    public void paintBattleSceen(Graphics g, FCRMaster fcrMaster) {

    }
}
